3.562 \(\int \frac{A+B x^2}{x^2 \sqrt{a+b x^2}} \, dx\)

Optimal. Leaf size=47 \[ \frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}-\frac{A \sqrt{a+b x^2}}{a x} \]

[Out]

-((A*Sqrt[a + b*x^2])/(a*x)) + (B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/Sqrt[b]

_______________________________________________________________________________________

Rubi [A]  time = 0.0639019, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136 \[ \frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}-\frac{A \sqrt{a+b x^2}}{a x} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x^2)/(x^2*Sqrt[a + b*x^2]),x]

[Out]

-((A*Sqrt[a + b*x^2])/(a*x)) + (B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/Sqrt[b]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 8.69821, size = 39, normalized size = 0.83 \[ - \frac{A \sqrt{a + b x^{2}}}{a x} + \frac{B \operatorname{atanh}{\left (\frac{\sqrt{b} x}{\sqrt{a + b x^{2}}} \right )}}{\sqrt{b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x**2+A)/x**2/(b*x**2+a)**(1/2),x)

[Out]

-A*sqrt(a + b*x**2)/(a*x) + B*atanh(sqrt(b)*x/sqrt(a + b*x**2))/sqrt(b)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0418477, size = 50, normalized size = 1.06 \[ \frac{B \log \left (\sqrt{b} \sqrt{a+b x^2}+b x\right )}{\sqrt{b}}-\frac{A \sqrt{a+b x^2}}{a x} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x^2)/(x^2*Sqrt[a + b*x^2]),x]

[Out]

-((A*Sqrt[a + b*x^2])/(a*x)) + (B*Log[b*x + Sqrt[b]*Sqrt[a + b*x^2]])/Sqrt[b]

_______________________________________________________________________________________

Maple [A]  time = 0.012, size = 41, normalized size = 0.9 \[{B\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){\frac{1}{\sqrt{b}}}}-{\frac{A}{ax}\sqrt{b{x}^{2}+a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x^2+A)/x^2/(b*x^2+a)^(1/2),x)

[Out]

B*ln(x*b^(1/2)+(b*x^2+a)^(1/2))/b^(1/2)-A*(b*x^2+a)^(1/2)/a/x

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)/(sqrt(b*x^2 + a)*x^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.232797, size = 1, normalized size = 0.02 \[ \left [\frac{B a x \log \left (-2 \, \sqrt{b x^{2} + a} b x -{\left (2 \, b x^{2} + a\right )} \sqrt{b}\right ) - 2 \, \sqrt{b x^{2} + a} A \sqrt{b}}{2 \, a \sqrt{b} x}, \frac{B a x \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - \sqrt{b x^{2} + a} A \sqrt{-b}}{a \sqrt{-b} x}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)/(sqrt(b*x^2 + a)*x^2),x, algorithm="fricas")

[Out]

[1/2*(B*a*x*log(-2*sqrt(b*x^2 + a)*b*x - (2*b*x^2 + a)*sqrt(b)) - 2*sqrt(b*x^2 +
 a)*A*sqrt(b))/(a*sqrt(b)*x), (B*a*x*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - sqrt(b
*x^2 + a)*A*sqrt(-b))/(a*sqrt(-b)*x)]

_______________________________________________________________________________________

Sympy [A]  time = 3.03454, size = 99, normalized size = 2.11 \[ - \frac{A \sqrt{b} \sqrt{\frac{a}{b x^{2}} + 1}}{a} + B \left (\begin{cases} \frac{\sqrt{- \frac{a}{b}} \operatorname{asin}{\left (x \sqrt{- \frac{b}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge b < 0 \\\frac{\sqrt{\frac{a}{b}} \operatorname{asinh}{\left (x \sqrt{\frac{b}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge b > 0 \\\frac{\sqrt{- \frac{a}{b}} \operatorname{acosh}{\left (x \sqrt{- \frac{b}{a}} \right )}}{\sqrt{- a}} & \text{for}\: b > 0 \wedge a < 0 \end{cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x**2+A)/x**2/(b*x**2+a)**(1/2),x)

[Out]

-A*sqrt(b)*sqrt(a/(b*x**2) + 1)/a + B*Piecewise((sqrt(-a/b)*asin(x*sqrt(-b/a))/s
qrt(a), (a > 0) & (b < 0)), (sqrt(a/b)*asinh(x*sqrt(b/a))/sqrt(a), (a > 0) & (b
> 0)), (sqrt(-a/b)*acosh(x*sqrt(-b/a))/sqrt(-a), (b > 0) & (a < 0)))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.245287, size = 78, normalized size = 1.66 \[ -\frac{B{\rm ln}\left ({\left (\sqrt{b} x - \sqrt{b x^{2} + a}\right )}^{2}\right )}{2 \, \sqrt{b}} + \frac{2 \, A \sqrt{b}}{{\left (\sqrt{b} x - \sqrt{b x^{2} + a}\right )}^{2} - a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)/(sqrt(b*x^2 + a)*x^2),x, algorithm="giac")

[Out]

-1/2*B*ln((sqrt(b)*x - sqrt(b*x^2 + a))^2)/sqrt(b) + 2*A*sqrt(b)/((sqrt(b)*x - s
qrt(b*x^2 + a))^2 - a)